package com.example.oppotest.entity.youku;

import java.util.HashMap;
import java.util.Map;

/**
 * @Author wyk
 * @Date: 2025/3/3 20:46
 *
 * TRACKID、CREATIVEID为必填参数
 *
 * 操作系统为IOS时必填参数为 IDFA、CAID
 *
 * 操作系统为安卓时必填参数为 IMEI、OAID
 *
 */
public class AdInfo {

    private Integer id;

    private Integer effpointId; // 关联有效检测链接id

    /**
     * 系统类型
     * 0-表示Android，1-表示iOS，2-表示Windows Phone，4-表示HarmonyOS，3-表示其他
     */
    private String os;

    /**
     * 回传侧ip
     */
    private String ip;

    /**
     * 用于追踪关联广告投放维度的id
     */
    private String trackId;

    /**
     * 广告投放创意id
     */
    private String creativeId;

    /**
     * 设备终端imei，md5摘要值，安卓上报
     */
    private String imei;

    /**
     * 设备终端oaid原值
     */
    private String oaid;

    /**
     * 设备终端idfa原值，iOS上报
     */
    private String idfa;

    /**
     * 互联网广告标识，版本号以及具体的CAID值，格式为：ver1_caid1，多个之间以逗号分割，例：20210301_xxxxxxxx,20210101_xxxxxx
     */
    private String caid;

    private String result; // 联调结果

    private String status; // 成功或失败

    private String xyResult; // 闲鱼上报结果

    private String ua; // user agent

    private String clickid; // 点击ID

    private String mac; // MAC地址

    private String androidid; // Android设备Id


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getEffpointId() {
        return effpointId;
    }

    public void setEffpointId(Integer effpointId) {
        this.effpointId = effpointId;
    }

    public String getOs() {
        return os;
    }

    public void setOs(String os) {
        this.os = os;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public String getTrackId() {
        return trackId;
    }

    public void setTrackId(String trackId) {
        this.trackId = trackId;
    }

    public String getCreativeId() {
        return creativeId;
    }

    public void setCreativeId(String creativeId) {
        this.creativeId = creativeId;
    }

    public String getImei() {
        return imei;
    }

    public void setImei(String imei) {
        this.imei = imei;
    }

    public String getOaid() {
        return oaid;
    }

    public void setOaid(String oaid) {
        this.oaid = oaid;
    }

    public String getIdfa() {
        return idfa;
    }

    public void setIdfa(String idfa) {
        this.idfa = idfa;
    }

    public String getCaid() {
        return caid;
    }

    public void setCaid(String caid) {
        this.caid = caid;
    }

    public String getResult() {
        return result;
    }

    public void setResult(String result) {
        this.result = result;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getXyResult() {
        return xyResult;
    }

    public void setXyResult(String xyResult) {
        this.xyResult = xyResult;
    }

    public String getUa() {
        return ua;
    }

    public void setUa(String ua) {
        this.ua = ua;
    }

    public String getClickid() {
        return clickid;
    }

    public void setClickid(String clickid) {
        this.clickid = clickid;
    }

    public String getMac() {
        return mac;
    }

    public void setMac(String mac) {
        this.mac = mac;
    }

    public String getAndroidid() {
        return androidid;
    }

    public void setAndroidid(String androidid) {
        this.androidid = androidid;
    }

    public String getStatusStr() {
        Map<String, String> map = new HashMap<String, String>();
        map.put("true", "成功");
        map.put("false", "失败");
        String ret = map.get(status);

        return ret == null ? "" : ret;
    }

    public String getOsStr() {
        Map<String, String> map = new HashMap<String, String>();
        map.put("0", "IOS");
        map.put("1", "Android");
        map.put("2", "Windows");
        map.put("3", "其他");
        String ret = map.get(os);

        return ret == null ? "" : ret;
    }
}
